package jdbc;

import jdbc.utill.DButil;

import java.sql.Connection;
import java.sql.Statement;

public class DButilDemo01 {
    public static void main(String[] args) throws Exception {
        Connection connection = DButil.getConnection();
        Statement statement = connection.createStatement();
        String sql ="insert into t_user (username,password,nickname,age)" +
                " values ('lili','123456','li',15)";
        int num  = statement.executeUpdate(sql);
        System.out.println(num>0?"success":"fail");
        DButil.close(connection);
    }
}
